package com.zswl.decorate.adapter;

import android.content.Context;
import android.support.v7.util.DiffUtil;
import android.view.View;
import android.widget.TextView;

import com.zswl.decorate.R;
import com.zswl.decorate.base.BaseRecycleViewAdapter;
import com.zswl.decorate.base.ViewHolder;
import com.zswl.decorate.bean.ShouYBean;
import com.zswl.decorate.ui.FlutterDemoActivity;

import java.util.List;

import static android.icu.lang.UCharacter.GraphemeClusterBreak.T;

public class ShouYAdapter extends BaseRecycleViewAdapter<ShouYBean> {
    public ShouYAdapter(Context context, List<ShouYBean> data, int layoutId) {
        super(context, data, layoutId);
    }

    @Override
    public void onBind(ShouYBean shouYBean, ViewHolder holder, int position) {
        TextView contributePeo = holder.getView(R.id.tv_contribute_people);
        TextView money = holder.getView(R.id.tv_money);
        TextView shouYPeo = holder.getView(R.id.tv_shuy_people);

        contributePeo.setText(shouYBean.getJuanzengren());
        money.setText("¥" + shouYBean.getMoney());
        shouYPeo.setText(shouYBean.getShouyiren());

        holder.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                FlutterDemoActivity.startMe(context);
            }
        });
    }
}
